/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package swa.e_store.entity;

import javax.persistence.*;

/**
 * This class represents the table 'employee' of the 'SWArchitecture' database.
 * 
 * @author Stefan
 */
@Entity
@Table (name = "employee")
@NamedQueries({
    //@NamedQuery(name = "TPerson.findAll", query = "SELECT t FROM TPerson t"),
    @NamedQuery(name = "employee.findByName", query = "SELECT e FROM Employee e WHERE e.name = :name")
})
public class Employee {
    
    @Id
    @GeneratedValue (strategy = GenerationType.IDENTITY)
    @Column (name = "USRID")
    private int USRID;
    
    @Column (name = "name")
    private String name;
    
    @Column (name = "employeeState", nullable = false)
    private int employeeState;
    
    @Column (name = "keyword", nullable = false)
    private String keyword;
    
    //Constructors
    public Employee(){
        
    }
    
    public Employee(int USRID, String name, int employeeState, String keyword){
        
        this.USRID = USRID;
        this.name = name;
        this.employeeState = employeeState;
        this.keyword = keyword;
    }
    
    //Getter & Setter

    /**
     * @return the USRID
     */
    public int getUSRID() {
        return USRID;
    }

    /**
     * @param USRID the USRID to set
     */
    public void setUSRID(int USRID) {
        this.USRID = USRID;
    }

    /**
     * @return the name
     */
    public String getName() {
        return name;
    }

    /**
     * @param name the name to set
     */
    public void setName(String name) {
        this.name = name;
    }
    
    

    /**
     * @return the employeeState
     */
    public int getEmployeeState() {
        return employeeState;
    }

    /**
     * @param employeeState the employeeState to set
     */
    public void setEmployeeState(int employeeState) {
        this.employeeState = employeeState;
    }
       
    // toString()
    @Override
    public String toString(){
        return "employee[USRID: " + USRID + ", name: " + name +
                ", employeeState: " + employeeState + "\n";
    }

    /**
     * @return the keyword
     */
    public String getKeyword() {
        return keyword;
    }

    /**
     * @param keyword the keyword to set
     */
    public void setKeyword(String keyword) {
        this.keyword = keyword;
    }
}
